/*
 * @Author: upp24 1246815351@qq.com
 * @Date: 2023-07-12 13:44:16
 * @LastEditors: alan_mf
 * @LastEditTime: 2024-03-18 09:20:53
 * @FilePath: /nuanyunOA_new/src/api/square.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type BannerResult = {
  page: number;
  pagesize: number;
  success: boolean;
  code: number;
  token: string;
  msg: string;
  data: {
    img(img: any): string;
    data: any[];
    total: number;
    page: number;
    pagesize: number;
  };
};
/** 朋友圈列表*/
export const squareList = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/list"), {
    data
  });
};
/** 朋友圈详情*/
export const squareDetail = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/info"), {
    data
  });
};
/** 详情数据*/
export const squareDetailData = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/user"), {
    data
  });
};
/** 朋友圈修改*/
export const squareUpdate = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/update"), {
    data
  });
};
/**------------------------------------ */
/**标签列表 */
export const squareLabelList = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/tag/list"), {
    data
  });
};
/**标签修改 */
export const squareLabelUpdate = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/tag/update"), {
    data
  });
};
/**标签删除 */
export const squareLabelDelete = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/tag/delete"), {
    data
  });
};
/**标签详情 */
export const squareLabelDetail = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/tag/info"), {
    data
  });
};
/**广场修改 */
export const squareUpdateDatil = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("square/update"), {
    data
  });
};
